package org.tissou.client.Services;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;

/**
 * Created by IntelliJ IDEA.
 * User: Claire
 * Date: 29-Oct-2009
 * Time: 07:44:31
 * To change this template use File | Settings | File Templates.
 */
public interface NouveauCompteService extends RemoteService {
    void CreerNouveauCompte(String nom, ProprietaireInfos proprietaire, MonnaieInfos monnaie
    ) throws MonException;

    /**
     * Utility/Convenience class.
     * Use NouveauCompteService.App.getInstance() to access static instance of NouveauCompteServiceAsync
     */
    public static class App {
        private static final NouveauCompteServiceAsync ourInstance;

        static {
            ourInstance = (NouveauCompteServiceAsync) GWT.create(NouveauCompteService.class);
            ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "NouveauCompteService");
        }

        public static NouveauCompteServiceAsync getInstance() {
            return ourInstance;
        }
    }
}
